<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta name="layout" content="main"/>
    <title>Detailed Transactions</title>
  </head>
  <body>
      <div id="contentText">
      <h2><span>Details of</span>Purchases</h2>
    </div>
    <div id="wrap90">
    <b>Receipt number :${cart.id}</b><br>
    <br>Amount : ${cart.amount}
    <br> Paypal Transaction ID : ${cart.paypalTransactionId}
    <br>Date : ${cart.paymentDate}
  
  <br>
  <br>
  <br><b>Items Purchased</b>
  <table>
    <th>Name</th>
    <th>Quantity</th>
    <th>Price</th>
    <th>Item detail</th>
  <g:each var="trans" in="${transactions}">
    <tr>
    <td>${org.toonWatch.Item.findById(trans.item_id)}</td>
    <td>${trans.quantity}</td>
    <td>${org.toonWatch.Item.findById(trans.item_id).price}</td>
    <td><g:link controller ="item" action="displayItem" id="${trans.item_id}">Item link</g:link></td> 
  </tr>
  </g:each>
  </table>
    </div>

</body>
</html>
